< previous page page_332 next page >

Page 332
StandardFont, you will notice that the appropriate properties have already been added to these pages.
tip.gif
You can drag and drop a property onto a tab to place it on the corresponding page of the Property Pages.

After you finish adding properties to the pages, click the Finish button to complete the creation of your Property Pages. Like the ActiveX Control Interface Wizard, the Property Pages Wizard shows a summary page that provides additional information for you to complete your custom control.
Using the Property Pages in Your Applications
To use the Property Pages you created, you need to add an instance of your custom control to a project. Then, in the Properties window, click the ellipsis ( . . . ) button next to the Custom property. Then, just like the Property Pages of other controls, your Property Pages dialog box presents itself to allow the user to customize the control. A sample of a custom control's Property Pages is shown in Figure 14.17.
0332-01.jpg
Figure 14.17
Your Property Pages help the
users set up your ActiveX control.
tip.gif
You also can access the Property Pages by right-clicking the control and selecting the Properties item from the context menu.

Creating a User-Drawn ActiveX Control
The previous two examples have demonstrated how to create ActiveX controls from other controls. The following sections will demonstrate how to create a control totally from scratch by drawing the interface with graphics methods and by creating the properties, methods, and events of the control. The control you create in this chapter is a command button with different foreground and background color settings, which is something you cannot do with a regular command button. Although a command button is a relatively simple example, it introduces you to the process of drawing your own control.

 
< previous page page_332 next page >